<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>文章详情与评论</title>
</head>
{% load static %}
<body style="background-color:rgba(102,102,102,1);">

	<div style="margin:10px auto 10px auto;background-color:rgba(204,204,204,0.5);width:900px;height:700px;">
    	<h1 style="text-align:center;">{{ article.title}}</h1>
		<a href="/topiclist">首页</a>
    	<div style="text-align:right;">
        	<h4>文章类型:{{article.topic}}</h4>
        	<h4>作者:{{article.author}}</h4>
        </div>
        <p>{{article.content}}
        <span><img src="../../static/{{ article.image }}" /></span>
        </p>
    </div>
        <div style="margin:10px auto 10px auto;background-color:rgba(204,204,204,0.5);width:900px;">
            <h3>评论区：</h3>
        {% for i in comment%}
            <p>
                <span>{{ i.comment_author }} </span>
                <span>{{ i.comment_time }} </span>
            </p>
            <p >
                <span>{{ i.content }}</span>
            </p>
            <p >
                <span>------------------------------------------</span>
            </p>
        {% endfor %}
    </div>
    <form method="POST" action="{% url 'comment' id %}">
        {% csrf_token %}
    <div style="margin-left:300px;">
        <textarea  rows="10"  cols="90" name="thiscomment"></textarea>
        <input value="评论" type="submit"/>
    </div>
    </form>
</body>
</html>